; generated by Component: ARM Compiler 5.05 update 1 (build 106) Tool: ArmCC [4d0efa]
; commandline ArmCC [--c99 --list --split_sections --debug -c --asm --interleave -o"..\output\pwm_ independent.o" --asm_dir=..\List\ --list_dir=..\List\ --depend="..\output\pwm_ independent.d" --cpu=Cortex-M0+ --apcs=interwork --diag_suppress=9931 -I..\FWLib\SC32F1XXX_Lib\inc -I..\User\HeadFiles -I..\User -I..\Drivers -I..\Apps -I..\CMSIS -ID:\Keil5\ARM\Pack\Keil\SC32F10xx_DFP\1.0.0\Device\SC32F10xx\FWLib\SC32_Lib\inc -ID:\Keil5\ARM\Pack\Keil\SC32F10xx_DFP\1.0.0\Device\SH32F2xx\Include -D__UVISION_VERSION=538 -DSC32F10xx --omf_browse="..\output\pwm_ independent.crf" "..\Apps\PWM_ Independent.c"]
                          THUMB

                          AREA ||i.PWM_Independent_Function||, CODE, READONLY, ALIGN=2

                  PWM_Independent_Function PROC
;;;13     
;;;14     void PWM_Independent_Function(void)
000000  b51f              PUSH     {r0-r4,lr}
;;;15     {
;;;16     	uint16_t i,j;
;;;17     	PWM_InitTypeDef PWM_InitStruct;
;;;18     	
;;;19     	/* ʹPWM0ʱ */
;;;20     	RCC_APB0Cmd(ENABLE);
000002  2001              MOVS     r0,#1
000004  f7fffffe          BL       RCC_APB0Cmd
;;;21     	RCC_APB0PeriphClockCmd(RCC_APB0Periph_PWM0,ENABLE);
000008  2101              MOVS     r1,#1
00000a  020c              LSLS     r4,r1,#8
00000c  4620              MOV      r0,r4
00000e  f7fffffe          BL       RCC_APB0PeriphClockCmd
;;;22     	
;;;23     	/* PWMýṹʼ */
;;;24     	PWM_StructInit(&PWM_InitStruct);
000012  4668              MOV      r0,sp
000014  f7fffffe          BL       PWM_StructInit
;;;25     	
;;;26     	/* PWMýṹ */
;;;27     	PWM_InitStruct.PWM_AlignedMode = PWM_AlignmentMode_Edge;	//PWMģʽΪض
000018  2000              MOVS     r0,#0
00001a  466a              MOV      r2,sp
00001c  8050              STRH     r0,[r2,#2]
;;;28     	PWM_InitStruct.PWM_Prescaler = PWM_PRESCALER_DIV2;	//PWM0ʱӷƵΪ2Ƶ
00001e  2101              MOVS     r1,#1
000020  8011              STRH     r1,[r2,#0]
;;;29     	PWM_InitStruct.PWM_Cycle = (uint16_t)(32000000/1000-1);	//PWMƵΪ1000Hz@PWMʱƵ=32MHz
000022  491f              LDR      r1,|L1.160|
000024  80d1              STRH     r1,[r2,#6]
;;;30     	                                                      //PWMֵΪPWMPD[15:0] + 1 / PWMʱƵ
;;;31     	PWM_InitStruct.PWM_OutputChannel = PWM_Channel_All;	//ʹȫPWM0
000026  21ff              MOVS     r1,#0xff
;;;32     	PWM_InitStruct.PWM_WorkMode = PWM_WorkMode_Independent;	//PWM0ģʽΪģʽ
000028  9102              STR      r1,[sp,#8]
;;;33     	PWM_Init(PWM0,&PWM_InitStruct);	//ʼPWM0
00002a  4e1e              LDR      r6,|L1.164|
00002c  8090              STRH     r0,[r2,#4]            ;32
00002e  4669              MOV      r1,sp
000030  4630              MOV      r0,r6
000032  f7fffffe          BL       PWM_Init
;;;34     	
;;;35     	PWM_SetDuty(PWM0,PWM_Channel_0,PWM_InitStruct.PWM_Cycle * 50/100);	//PWM00ռձΪ50%
000036  466a              MOV      r2,sp
000038  88d0              LDRH     r0,[r2,#6]
00003a  2132              MOVS     r1,#0x32
00003c  4348              MULS     r0,r1,r0
00003e  2164              MOVS     r1,#0x64
000040  f7fffffe          BL       __aeabi_uidivmod
000044  b282              UXTH     r2,r0
000046  2101              MOVS     r1,#1
000048  4630              MOV      r0,r6
00004a  f7fffffe          BL       PWM_SetDuty
;;;36     	
;;;37     	/* ʹPWM0ж */
;;;38     	PWM_ITConfig(PWM0,PWM_IT_INTEN,ENABLE);
00004e  2201              MOVS     r2,#1
000050  4621              MOV      r1,r4
000052  4630              MOV      r0,r6
000054  f7fffffe          BL       PWM_ITConfig
000058  4913              LDR      r1,|L1.168|
00005a  0360              LSLS     r0,r4,#13
00005c  6008              STR      r0,[r1,#0]
;;;39     	NVIC_EnableIRQ(PWM0_IRQn);
;;;40     	
;;;41     	PWM_Cmd(PWM0,ENABLE);//ʹPWM0
00005e  2101              MOVS     r1,#1
000060  4630              MOV      r0,r6
000062  f7fffffe          BL       PWM_Cmd
;;;42     
;;;43     	while(1)
;;;44     	{
;;;45     		/* PWM0ռձ޸ */
;;;46     		for(i=0;i<=10;i++)
;;;47     		{
;;;48           for(j=0;j<40000;j++);//ʱ
000066  4d11              LDR      r5,|L1.172|
                  |L1.104|
000068  2400              MOVS     r4,#0                 ;46
                  |L1.106|
00006a  2000              MOVS     r0,#0
                  |L1.108|
00006c  1c40              ADDS     r0,r0,#1
00006e  b280              UXTH     r0,r0
000070  42a8              CMP      r0,r5
000072  d3fb              BCC      |L1.108|
;;;49     			PWM_SetDuty(PWM0,PWM_Channel_All,PWM_InitStruct.PWM_Cycle * i*10/100);	//ռձȴ0-100%
000074  4668              MOV      r0,sp
000076  88c0              LDRH     r0,[r0,#6]
000078  210a              MOVS     r1,#0xa
00007a  4361              MULS     r1,r4,r1
00007c  4348              MULS     r0,r1,r0
00007e  2164              MOVS     r1,#0x64
000080  f7fffffe          BL       __aeabi_idivmod
000084  b282              UXTH     r2,r0
000086  21ff              MOVS     r1,#0xff
000088  4630              MOV      r0,r6
00008a  f7fffffe          BL       PWM_SetDuty
00008e  1c64              ADDS     r4,r4,#1
000090  b2a4              UXTH     r4,r4                 ;46
000092  2c0a              CMP      r4,#0xa               ;46
000094  d9e9              BLS      |L1.106|
;;;50     		}				
;;;51     			
;;;52     		/* PWM0Ƶ޸ */
;;;53     		PWM_SetPrescaler(PWM0,PWM_PRESCALER_DIV4);//PWM0ʱӷƵ޸Ϊ4Ƶ
000096  2102              MOVS     r1,#2
000098  4630              MOV      r0,r6
00009a  f7fffffe          BL       PWM_SetPrescaler
00009e  e7e3              B        |L1.104|
;;;54     		
;;;55     	}
;;;56     }
;;;57     
                          ENDP

                  |L1.160|
                          DCD      0x00007cff
                  |L1.164|
                          DCD      0x40020200
                  |L1.168|
                          DCD      0xe000e100
                  |L1.172|
                          DCD      0x00009c40

                          AREA ||i.PWM_Independent_PWMHandler||, CODE, READONLY, ALIGN=2

                  PWM_Independent_PWMHandler PROC
;;;57     
;;;58     void PWM_Independent_PWMHandler(void)
000000  b510              PUSH     {r4,lr}
;;;59     {
;;;60     	/* жPWM0жǷ */
;;;61     	if(PWM_GetFlagStatus(PWM0,PWM_Flag_PWMIF) == SET)
000002  4c06              LDR      r4,|L2.28|
000004  2101              MOVS     r1,#1
000006  4620              MOV      r0,r4
000008  f7fffffe          BL       PWM_GetFlagStatus
00000c  2801              CMP      r0,#1
00000e  d103              BNE      |L2.24|
;;;62     	{
;;;63     		PWM_ClearFlag(PWM0,PWM_Flag_PWMIF);	//PWM0ж
000010  2101              MOVS     r1,#1
000012  4620              MOV      r0,r4
000014  f7fffffe          BL       PWM_ClearFlag
                  |L2.24|
;;;64     	}
;;;65     }
000018  bd10              POP      {r4,pc}
                          ENDP

00001a  0000              DCW      0x0000
                  |L2.28|
                          DCD      0x40020200

;*** Start embedded assembler ***

#line 1 "..\\Apps\\PWM_ Independent.c"
	AREA ||.rev16_text||, CODE
	THUMB
	EXPORT |__asm___18_PWM__Independent_c_8b4d8ba3____REV16|
#line 463 "..\\CMSIS\\cmsis_armcc.h"
|__asm___18_PWM__Independent_c_8b4d8ba3____REV16| PROC
#line 464

 rev16 r0, r0
 bx lr
	ENDP
	AREA ||.revsh_text||, CODE
	THUMB
	EXPORT |__asm___18_PWM__Independent_c_8b4d8ba3____REVSH|
#line 478
|__asm___18_PWM__Independent_c_8b4d8ba3____REVSH| PROC
#line 479

 revsh r0, r0
 bx lr
	ENDP

;*** End   embedded assembler ***
